#pragma once
#include "common.h"
#include "block.h"
#include "stdio.h"

class from_file
{
public:
					from_file		(void);
					~from_file		(void);
	int				ToBinary		(char* szData, int* iBitsNumber);
	double			ParseTime		(char* szTime, char* szUnits);
	int				CountVectors	(FILE* Input, int iNumOfColumns, int iInT);
	int				ParseData		(FILE* Input, int iNumOfColumns, PSVECTOR* sVectorArray, int iNumOfVectors, int iInT, int* MatchArray, int iBitsNumber);
	int				CountNoRepeats	(PSVECTOR sWithRepeatsVectorArray, int iNumberOfVectors);
	int				LeaveNoRepeats	(PSVECTOR sWithRepeatsVectorArray, int iVectorsInWithRepeats, PSVECTOR* sSlowVectorArray);
	int				RemoveZeros		(PSVECTOR sSource, int iVectorsInSource, PSVECTOR* sDestination, double Threshhold);
	double			FindPhase		(PSLINE sLineArray, int iNumOfLines, int iSignal, double ClockCycle);
	double			UpdatePhases	(PSLINE sLineArray, int iNumOfLines, int iRefSignal, double ClockCycle, PSUTG_SIGNAL sSignals);
public:
	block			mblock;
};
